package com.xunyun.kotlinwc.main.api

import com.xunyun.kotlinwc.login.model.UserBean
import com.xunyun.kotlinwc.main.model.ArticleBean
import com.xunyun.kotlinwc.main.model.BannerBean
import com.xunyun.kotlinwc.main.model.Project
import com.xunyun.kotlinwc.main.model.ProjectBean
import com.xunyun.kotlinwc.network.response.ResponseData
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * @author gl
 * @date 2021/9/10
 * @desc
 */
interface MainService {
    @GET("banner/json")
    fun getBannerData(): Observable<ResponseData<List<BannerBean>>>

    @GET("article/list/{page}/json")
    fun getArticleData(
        @Path("page") page: Int,
        @Query("page_size") pageSize: Int
    ): Observable<ResponseData<ArticleBean>>

    @GET("project/list/{page}/json")
    fun getProjectData(
        @Path("page") page: Int,
        @Query("page_size") pageSize: Int,
        @Query("cid") cid: Int,
    ): Observable<ResponseData<ProjectBean>>

}